using Elio.ViewModels;

namespace Elio.Views;

public partial class ElegantPage
{
    private readonly ElegantPageViewModel _viewModel;
    public ElegantPage(ElegantPageViewModel viewModel)
    {
        InitializeComponent();
        BindingContext = this._viewModel = viewModel;
    }

    protected override void OnSizeAllocated(double width, double height)
    {
        base.OnSizeAllocated(width, height);
        _viewModel.PageSize = new Size(Width, Height);
    }
}